package com.zsrt.t07;

import java.util.Scanner;

import org.junit.Test;

public class T07Test {
	
	/**
	 * 判断是润年
	 * @throws Exception
	 */
	@Test
	public void panDanRunNian() throws Exception {
		
		 T07 t=new T07();
		 boolean flag = t.panDan(2016);
		 if(flag){
			 System.out.println("是润年");
		 }else{
			 System.out.println("不是润年");
		 }
	}

	/**
	 * 输入数判断是不是润年
	 * @throws Exception
	 */
	@Test
	public void panDanRunNian2() throws Exception {
		
		T07 t=new T07();
		Scanner sc=new Scanner(System.in);
		System.out.println("输入一个年份：");
		int year=sc.nextInt();
		boolean flag = t.panDan(year);
		if(flag){
			System.out.println(year+"是润年");
		}else{
			System.out.println(year+"不是润年");
		}
		sc.close();
	}
}
